package cn.jiyun.service.impl;

import cn.jiyun.entity.Contest;
import cn.jiyun.mapper.ContestMapper;
import cn.jiyun.service.ContestService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author weiyuanhang
 * @data: 2023/8/28 002811:55
 * @Package cn.jiyun.service.impl
 * @email 3185757326@qq.com
 */
@Service
public class ContestServiceImpl extends ServiceImpl<ContestMapper, Contest> implements ContestService {
    @Autowired
    private ContestMapper contestMapper;

    @Override
    public Object savecontest(Contest contest) {
        contest.setStatus(2);
        contest.setInfos(contest.getInfos()+1);
       return contestMapper.updateById(contest);
    }
}
